package com.service.Impl;

import com.Annotation.Autowired;
import com.Annotation.Bean;
import com.dao.UserDao;
import com.dao.Impl.UserDaoImpl;
import com.entity.User;
import com.service.UserService;

@Bean
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao userDao; //=new UserDaoImpl();

    @Override
    public void login() {
        userDao.findUserByName();
        System.out.println("这是登录业务的实现方法");
    }

    @Override
    public void regist() {
        userDao.saveUser(new User(1,"liu","123",18));
        System.out.println("这是注册业务的实现方法");
    }
}
